home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group96a.txt / 000137_icon-group-sender _Tue Jun 18 13:11:43 1996.msg < prev    next >
Internet Message Format  |  1996-09-05  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Tue, 18 Jun 1996 08:58:26 MST
  2. Message-Id: <31C69CFF.6292@tees.ac.uk>
  3. Date: Tue, 18 Jun 1996 13:11:43 +0100
  4. From: Hamish Lawson <H.Lawson@tees.ac.uk>
  5. Organization: University of Teesside
  6. X-Mailer: Mozilla 3.0b4Gold (Win95; I)
  7. Mime-Version: 1.0
  8. To: icon-group@cs.arizona.edu
  9. Subject: Re: Locking files
  10. References: <9606140653.AA00140@canardo.unicaen.fr>
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. Errors-To: icon-group-errors@cs.arizona.edu
  14. Status: O
  15.  
  16. Jerzy Karczmarczuk wrote:
  17.  
  18. > there is a cheap way of locking something
  19. > globally used for ages: the *creation* of a special "lock" file
  20. > just before entering the critical section (if it is absent,
  21. > otherwise sleep/wait), and the destruction after.
  22.  
  23. Is there not a small risk that in the time between some process finding 
  24. that the lock file doesn't exist and creating this file, another process 
  25. might also find that the lock file doesn't exist, thereby breaking the 
  26. exclusivity mechanism.
  27.  
  28. | Hamish Lawson, School of Computing and Mathematics, 
  29. | University of Teesside, Middlesbrough, Cleveland, UK, TS1 3BA 
  30. | Tel: +44 1642 212695  Fax: +44 1642 342604
  31. | E-mail: H.Lawson@tees.ac.uk
  32.